package com.aggregate.iot.sanstar.device.bean;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;

/**
 * 响应参数
 * @author Moyq5
 * @date 2017年9月29日
 */
public class Result<D> {

	public enum Status {
		OK, FAIL, ERROR;
	}

	/**
	 * 状态
	 */
	@JsonSerialize
	private Status status = Status.FAIL;
	/**
	 * 状态信息描述
	 */
	@JsonSerialize
	private String message = "";
	/**
	 * 错误码
	 */
	@JsonSerialize
	private String code = "";
	/**
	 * 业务类型
	 */
	private Integer bizType;
	/**
	 * 接口结果参数，非必填
	 */
	private D data;
	/**
	 * 签名值，长32， 必填
	 */
	private String sign;
	public Status getStatus() {
		return status;
	}
	public void setStatus(Status status) {
		this.status = status;
	}
	public String getMessage() {
		return message;
	}
	public void setMessage(String message) {
		this.message = message;
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public D getData() {
		return data;
	}
	public void setData(D data) {
		this.data = data;
	}
	public String getSign() {
		return sign;
	}
	public void setSign(String sign) {
		this.sign = sign;
	}
	public Integer getBizType() {
		return bizType;
	}
	public void setBizType(Integer bizType) {
		this.bizType = bizType;
	}
	@Override
	public String toString() {
		return "Result [status=" + status + ", message=" + message + ", code=" + code + ", bizType=" + bizType
				+ ", data=" + data + ", sign=" + sign + "]";
	}
	
}